package com.linkoog.devtools.datafaker.generator;

import com.linkoog.devtools.datafaker.Generator;

public class PhoneNumGenerator implements Generator {

    @Override
    public String generate() {
        String phoneFirstNum = prefix[(int) (Math.random() * prefix.length)];
        String phoneLastNum = "";
        final int LENPHONE = 8;
        for (int i = 0; i < LENPHONE; i++) {
            phoneLastNum += (int) (Math.random() * 10);
        }

        return phoneFirstNum + phoneLastNum;
    }

    private static String[] prefix = {"133", "149", "153", "173", "177",
            "180", "181", "189", "199", "130", "131", "132",
            "145", "155", "156", "166", "171", "175", "176", "185", "186", "166", "134", "135",
            "136", "137", "138", "139", "147", "150", "151", "152", "157", "158", "159", "172",
            "178", "182", "183", "184", "187", "188", "198", "170", "171"};

}
